package com.szf.mywiki.service;

import com.szf.mywiki.mapper.EbookSnapshotCustMapper;
import com.szf.mywiki.resp.StatisticResp;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class EbookSnapshotService {
    @Resource
    private EbookSnapshotCustMapper ebookSnapshotCustMapper;

    public void genSnapshot() {
        ebookSnapshotCustMapper.genSnapshot();
    }

    /**
     * 获取首页数值数据：总阅读数、总点赞数、今日阅读数、今日点赞数、今日预计阅读数、今日预计阅读增长
     */
    public List<StatisticResp> getStatistic() {
        return ebookSnapshotCustMapper.getStatistic();
    }

    public List<StatisticResp> get30Statistic() {
        return ebookSnapshotCustMapper.get30Statistic();
    }
}
